package com.chukun.netty.http;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.HttpServerCodec;

/**
 * @author chukun
 */
public class SimpleHttpServerChannelInitializer extends ChannelInitializer<SocketChannel> {

    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        socketChannel.pipeline().addLast("httpCodec",new HttpServerCodec());
        socketChannel.pipeline().addLast("simpleHttpServerHandler",new SimpleHttpServerHandler());
    }
}
